﻿namespace Sogeti.VSExtention
{
    using System;
    using System.Diagnostics;
    using Microsoft.TeamFoundation.Client;
    using Microsoft.TeamFoundation.Common;
    using Microsoft.TeamFoundation.WorkItemTracking.Client;

    public class TeamExplorerIntergator
    {
        private TfsTeamProjectCollection m_tfs;

        public string tpName { get; set; }

        public TfsTeamProjectCollection tpCollection
        {
            get
            {
                return m_tfs;
            }

            set
            {
                m_tfs = value;
            }
        }

        /// <summary>Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. Receives notification when the collection of Add-ins has changed.</summary> 
        /// <param term = 'custom'>Array of parameters that are host application specific.</param> 
        /// <seealso class = 'IDTExtensibility2' />        
        public void OnAddInsUpdate(ref Array custom)
        {
        }

        /// <summary>ments the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading.</summary> 
        /// <param term = 'custom'>Array of parameters that are host application specific.</param> 
        /// <seealso class = 'IDTExtensibility2' /> 
        public void OnStartupComplete(ref Array custom)
        {
        }

        /// <summary>Implements the OnBeginShutdown method of the IDTExtensibility2 interface. Receives notification that the host application is being unloaded.</summary> 
        /// <param term = 'custom'>Array of parameters that are host application specific.</param> 
        /// <seealso class = 'IDTExtensibility2' /> 
        public void OnBeginShutdown(ref Array custom)
        {
        }

        /// <summary> 
        /// Raised by the TFS Visual Studio integration package when the active project context changes. 
        /// </summary> 
        /// <param name = "sender"></param> 
        /// <param name = "e"></param> 
     
        private void SwitchToTfs(TfsTeamProjectCollection tfs)
        {
            if (object.ReferenceEquals(m_tfs, tfs))
            {
                // No work to do; could be a team project switch only 
                return;
            }

            m_tfs = tfs;
        }
    }
}
